#
# make MACRO="value" [MACRO="value" ...] TARGET [TARGET ...]
#
#

CC = cc					# /usr/bin/cc same with /usr/bin/gcc
LD = cc
STRIP = strip
CFLAGS = 
LDFLAGS =

SRCS  = ../src/obs.c             \
	    ../src/obs_daemon.c		\
        ../src/obs_server.c		\
        ../src/obs_client.c		\
        ../src/obs_logger.c		\
	    ../src-x86/cpu.c

OBJS = ${SRCS:C/.*\/(.*).c/\1.o/g}
#.for src in $(SRC)
#.endfor

ELF_TARGET = obs.elf
TARGET = obs

DIST = $(TARGET)

all: $(TARGET)

$(ELF_TARGET):$(OBJS)
	$(LD) -o $@ $(LDFLAGS) $(OBJS)

$(TARGET):$(ELF_TARGET)
	$(STRIP) -s -o $(TARGET) $(ELF_TARGET)

.include "../BSDmakefile"
